package com.yuan.pic;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Hashtable;
import java.util.Map;
import java.util.Properties;

/**
 * Created by 袁恩光 on 2018/3/29.
 */
public class Utils {

    private static final String CONFIG_NAME = "upload.properties";

    public static Map<String, String> getParams() {
        Properties properties = null;
        try {
            File file = new File(System.getProperty("catalina.base") + "\\conf\\" + CONFIG_NAME);
            InputStream inputStream = new FileInputStream(file);
            properties = new Properties();
            properties.load(inputStream);
        } catch (Exception e) {
            e.printStackTrace();
        }
        Hashtable map = properties;
        return map;
    }


}
